<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改产品')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-product-edit" th:object="${tProduct}">
            <input name="pid" th:field="*{pid}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">产品名称：</label>
                <div class="col-sm-8">
                    <input name="pname" th:field="*{pname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">类别：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="category" id="category">

                        <option value="饰品">饰品</option>
                        <option value="家居">家居</option>
                        <option value="壁纸">壁纸</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">系列：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="sname" id="sname">

                        <option value="现代家居">现代家居</option>
                        <option value="古典家居">古典家居</option>
                        <option value="后现代家居">后现代家居</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">风格：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="style" id="style" >

                   <option value="中国风">中国风</option>
                        <option value="欧美风">欧美风</option>
                        <option value="田园风">田园风</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">规格：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="specification" id="specification">

                        <option value="10米规格">10米规格</option>
                        <option value="15米规格">15米规格</option>
                        <option value="20米规格">20米规格</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">材质：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="texture" id="texture">

                        <option value="五金件">五金件</option>
                        <option value="红木">红木</option>
                        <option value="金丝楠木">金丝楠木</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">产地：</label>
                <div class="col-sm-8">
                    <input name="parea" th:field="*{parea}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单价：</label>
                <div class="col-sm-8">
                    <input name="price" th:field="*{price}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">数量：</label>
                <div class="col-sm-8">
                    <input name="pnum" th:field="*{pnum}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">进口家具在途：</label>
                <div class="col-sm-8">
                    <input name="pflag" th:field="*{pflag}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="premark" th:field="*{premark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/product";
        $("#form-product-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
            }
        }
    </script>
</body>
</html>